﻿Imports Ext.Net
Imports Logging

Public Class UIPage
    Inherits System.Web.UI.Page




    Private Sub Page_Error(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Error
        Dim ctx As Web.HttpContext = Web.HttpContext.Current
        Dim exception As Exception = ctx.Server.GetLastError()

        Response.Write(exception.Message)

        '*** Write Log Error ***
        Dim l As New Log
        l.pathName = Server.MapPath("../../Logs/")
        l.url = Page.Request.Url.AbsoluteUri
        l.errorMessage = exception.Message
        l.stackTrace = exception.StackTrace
        l.write_log()

        ctx.Server.ClearError()
    End Sub


End Class
